const customerController = require('../../controllers/o2o_client/customer.controller.js');
const express = require('express');
const multer = require('multer');
let upload = multer();


module.exports = (app)=>{
    var router = express.Router();
    router.route('/login').post(customerController.login);
    let CpUpload = upload.fields([{ name: 'portrait', maxCount: 1 }]);
    router.route('/register').post(CpUpload,customerController.register);
    router.route('/updateInfo').post(customerController.updateInfo);
    router.route('/findCustomerById/:customerId').get(customerController.findCustomerById);
    app.use('/customer',router);
}
